using System.Runtime.CompilerServices;

namespace Box2D.Net.Collision
{
    /// The features that intersect to form the contact point
    /// This must be 4 bytes or less.
    public struct ContactFeature
    {
        internal byte indexA;
        internal byte indexB;
        internal byte typeA;
        internal byte typeB;

        /// <summary>
        /// Feature index on shapeA
        /// </summary>
        public byte IndexA
        {
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            get => indexA;
        }

        /// <summary>
        /// Feature index on shapeB
        /// </summary>
        public byte IndexB
        {
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            get => indexB;
        }

        /// <summary>
        /// The feature type on shapeA
        /// </summary>
        public byte TypeA
        {
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            get => typeA;
        }

        /// <summary>
        /// The feature type on shapeB
        /// </summary>
        public byte TypeB
        {
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            get => typeB;
        }
    }
}